package com.Controller;
import com.Service.GroupJoinService;
import com.pojo.GroupJoin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@Controller
@RequestMapping("/join")
public class GroupJoinController {

    @Autowired
    private GroupJoinService joinService;

    @PostMapping("/join")
    public String joinActivity(@RequestParam Long userId, @RequestParam Long activityId) {
        joinService.join(userId, activityId);
        return "redirect:/activity/list";
    }
}